package vcp.entity;

import java.io.Serializable;

import vcp.entity.utility.ParkingMatrix;
import vcp.enums.SiteEnum;
/**
 * <p> site class includes getters and setters </p>
 * @author VCP team
 *
 */
public class Site implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = - 931892774333958187L;

	private static final int FLOORS = 3;
	private static final int ROWS = 3;

	private SiteEnum site;
	/**
	 * getter
	 * @return site
	 */
	public SiteEnum getSite ()
	{
		return this.site;
	}
	/**
	 * setter
	 * @param site
	 */
	public void setSite ( SiteEnum site )
	{
		this.site = site;
	}
	/**
	 * getter
	 * @return site id
	 */
	public Integer getSiteID ()
	{
		return this.site.getSiteID();
	}
	/**
	 * getter
	 * @return site name
	 */
	public String getSiteName ()
	{
		return this.site.toString();
	}
	/**
	 * getter
	 * @return site capacity
	 */
	public int getCapacity ()
	{
		return Site.FLOORS * Site.FLOORS * this.columns;
	}
	/**
	 * getter
	 * @return number of free lots
	 */
	public int getFreeLots ()
	{
		return this.getCapacity()
				- this.getDamagedLots()
				- this.getReservedLots()
				- this.getOccupiedLots();
	}

	private int damagedLots;
	/**
	 * getter
	 * @return number of damaged lots
	 */
	public int getDamagedLots ()
	{
		return this.damagedLots;
	}
	/**
	 * setter
	 * @param damagedLots
	 */
	public void setDamagedLots ( int damagedLots )
	{
		this.damagedLots = damagedLots;
	}

	private int occupiedLots;
	/**
	 * getter
	 * @return number of occupied lots
	 */
	public int getOccupiedLots ()
	{
		return this.occupiedLots;
	}
	/**
	 * setter
	 * @param occupiedLots
	 */
	public void setOccupiedLots ( int occupiedLots )
	{
		this.occupiedLots = occupiedLots;
	}

	private int reservedLots;
	/**
	 * getter
	 * @return number of reserved lots
	 */
	public int getReservedLots ()
	{
		return this.reservedLots;
	}
	/**
	 * setter
	 * @param reservedLots
	 */
	public void setReservedLots ( int reservedLots )
	{
		this.reservedLots = reservedLots;
	}

	private ParkingMatrix parkingMatrix;
	/**
	 * getter
	 * @return parking matrix
	 */
	public ParkingMatrix getParkingMatrix ()
	{
		if ( this.parkingMatrix == null )
		{
			this.parkingMatrix = new ParkingMatrix(this);
		}
		return this.parkingMatrix;
	}
	/**
	 * getter
	 * @return rows
	 */
	public int getRows ()
	{
		return Site.ROWS;
	}

	private int columns;
	/**
	 * getter
	 * @return columns
	 */
	public int getColumns ()
	{
		return this.columns;
	}
	/**
	 * setter
	 * @param columns
	 */
	public void setColumns ( int columns )
	{
		this.columns = columns;
	}
	/**
	 * getter
	 * @return floors
	 */
	public int getFloors ()
	{
		return Site.FLOORS;
	}

	private float singleUsePricePerHour;
	/**
	 * getter
	 * @return single use price per hour
	 */
	public float getSingleUsePricePerHour ()
	{
		return this.singleUsePricePerHour;
	}
	/**
	 * setter
	 * @param singleUsePricePerHour
	 */
	public void setSingleUsePricePerHour ( float singleUsePricePerHour )
	{
		this.singleUsePricePerHour = singleUsePricePerHour;
	}

	private float orderAheadPricePerHour;
	/**
	 * getter
	 * @return order ahead price per hour
	 */
	public float getOrderAheadPricePerHour ()
	{
		return this.orderAheadPricePerHour;
	}
	/**
	 * setter
	 * @param orderAheadPricePerHour
	 */
	public void setOrderAheadPricePerHour ( float orderAheadPricePerHour )
	{
		this.orderAheadPricePerHour = orderAheadPricePerHour;
	}

	private float casualPriceSingleCar;
	/**
	 * getter
	 * @return casual subscriber price per hour
	 */
	public float getCasualPriceSingleCar ()
	{
		return this.casualPriceSingleCar;
	}
	/**
	 * setter
	 * @param casualPriceSingleCar
	 */
	public void setCasualPriceSingleCar ( float casualPriceSingleCar )
	{
		this.casualPriceSingleCar = casualPriceSingleCar;
	}

	private float fullPriceSingleCar;
	/**
	 * getter
	 * @return full subscriber with single car price per hour
	 */
	public float getFullPriceSingleCar ()
	{
		return this.fullPriceSingleCar;
	}
	/**
	 * setter
	 * @param fullPriceSingleCar
	 */
	public void setFullPriceSingleCar ( float fullPriceSingleCar )
	{
		this.fullPriceSingleCar = fullPriceSingleCar;
	}
}
